home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
How Would You Survive?
/
How Would You Survive (1995)(Grolier)[Mac-PC].iso
/
mac
/
SHARED.DIR
/
01983_Script_aSurvivalGuide
< prev
next >
Wrap
Text File
|
1995-09-13
|
13KB
|
471 lines
property pSprite,pCast,pNutral,pHilighted,pSelected1,pAnimate2,pAnimate3,¼
pAnimate4,pMySound,pCursor,pbeenClicked,pFunction1,pFunction2,pFunction3,¼
pFunction4,pRow1,pRow2,pRow3,pRow4,pCleanUpFunction,phelpStatus,how,map,basic,time
on birth me,theSprite,theCast,aSelected1,aFunction1,aFunction2,aFunction3,¼
aFunction4,aCursor,aSound,aCleanUpFunction
set pSprite = theSprite
set pCast = theCast
set pNutral = pCast
set pHilighted = pCast + 1
set pSelected1 = aSelected1
set pAnimate2 = pSelected1 + 1
set pAnimate3 = pSelected1 + 2
set pAnimate4 = pSelected1 + 3
set pRow1 = aSelected1 + 4
set pRow2 = aSelected1 + 5
set pRow3 = aSelected1 + 6
set pRow4 = aSelected1 + 7
set pFunction1 = aFunction1
set pFunction2 = aFunction2
set pFunction3 = aFunction3
set pFunction4 = aFunction4
set pcursor = aCursor
set pMySound = aSound
set pCleanUpFunction = aCleanUpFunction
set phelpStatus = 0
set how = 0
set map = 0
set basic = 0
set time = 0
puppetSprite pSprite,TRUE
set the castNum of sprite pSprite = pCast
return me
end
on hilight me
puppetsprite pSprite, true
set pbeenclicked = 0
set beenclickedtwice = 0
puppettransition 0
set the cursor of sprite pSprite = [1904, 1905]
repeat while (rollover(pSprite))
if (the castNum of sprite pSprite = pNutral) then
set the castNum of sprite pSprite = pHilighted
if phelpStatus = 1 then
puppetsound pMySound
updatestage
end if
set pbeenclicked = False
updatestage
if soundbusy(3) then
exit
end if
else
if (the Mousedown) then
if (not(pCleanUpFunction = " ")) then
do pCleanUpFunction
end if
preloadcast pSelected1, pRow4
set the castNum of sprite pSprite = pSelected1
set the visible of sprite 35 to false
puppetsound "SurvivalKitUnfold.AIFF"
updatestage
set the castNum of sprite pSprite = pAnimate2
updatestage
set the castNum of sprite pSprite = pAnimate3
updatestage
set the castNum of sprite pSprite = pAnimate4
updatestage
set pbeenclicked = 1
exit repeat
else
if soundbusy(3) then
exit
end if
end if
end if
end repeat
if pbeenclicked = 1 then
repeat while (rollover(pSprite))
if (the mouseup) then
SurvivalRollover
if (the mousedown) then
set the visible of sprite 35 to false
set beenclickedtwice = 1
end if
else
if beenclickedtwice = 0 then
dontpassevent
else
if beenclickedtwice = 1 then
if Map = true then
set count = 0
repeat while count < 4
set the castNum of sprite pSprite = pAnimate4
updatestage
wait .1
set the castNum of sprite pSprite = pRow1
updatestage
wait .1
set count = count + 1
end repeat
reset me
set the cursor of sprite pSprite = [1910, 1911]
set Map = 0
do pfunction1
return false
else
if Time = 1 then
set count = 0
repeat while count < 4
set the castNum of sprite pSprite = pAnimate4
updatestage
wait .1
set the castNum of sprite pSprite = pRow2
updatestage
wait .1
set count = count + 1
end repeat
reset me
set the cursor of sprite pSprite = [1910, 1911]
set Time = 0
do pfunction2
return false
else
if Basic = 1 then
set count = 0
repeat while count < 4
set the castNum of sprite pSprite = pAnimate4
updatestage
wait .1
set the castNum of sprite pSprite = pRow3
updatestage
wait .1
set count = count + 1
end repeat
reset me
set the cursor of sprite pSprite = [1910, 1911]
set Basic = 0
do pfunction3
return false
else
if How = 1 then
set count = 0
repeat while count < 4
set the castNum of sprite pSprite = pAnimate4
updatestage
wait .1
set the castNum of sprite pSprite = pRow4
updatestage
wait .1
set count = count + 1
end repeat
reset me
set the cursor of sprite pSprite = [1910, 1911]
set How = 0
do pfunction4
return false
else
reset me
end if
end if
end if
end if
end if
end if
end if
end repeat
end if
if phelpStatus = 1 then
puppetsound 0
end if
if rollover(pSprite) then
if (the castNum of sprite pSprite = pHilighted) then
return TRUE
else
if (the castNum of sprite pSprite = pAnimate4) then
return TRUE
else
set the castNum of sprite pSprite = pHilighted
return TRUE
end if
end if
else
reset me
return false
end if
end
on setNewFunctions me, aFunction1, aFunction2, aFunction3, aFunction4
set pFunction1 = aFunction1
set pFunction2 = aFunction2
set pFunction3 = aFunction3
set pFunction4 = aFunction4
end
on setNewCleanUpFunction me, NewCleanUpFunction
set pCleanUpFunction = NewCleanUpFunction
end
on reset me
set the castNum of sprite pSprite = pNutral
SetVisiblesTrue
set the visible of sprite 35 to true
updatestage
unloadcast pSelected1, pRow4
end
on ChangeSurvivalArt me, newAnimationArt
set pSelected1 = newAnimationArt
set pAnimate2 = pSelected1 + 1
set pAnimate3 = pSelected1 + 2
set pAnimate4 = pSelected1 + 3
set pRow1 = pSelected1 + 4
set pRow2 = pSelected1 + 5
set pRow3 = pSelected1 + 6
set pRow4 = pSelected1 + 7
end
on Wait amount
starttimer
repeat while the timer < (amount * 60)
nothing
end repeat
end wait
on HowStatus me
set How = 1
set Basic = 0
set Time = 0
set Map = 0
set the castNum of sprite pSprite = pRow4
updatestage
end
on BasicStatus me
set How = 0
set Basic = 1
set Time = 0
set Map = 0
set the castNum of sprite pSprite = pRow3
updatestage
end
on TimeStatus me
set How = 0
set Basic = 0
set Time = 1
set Map = 0
set the castNum of sprite pSprite = pRow2
updatestage
end
on MapStatus me
set How = 0
set Basic = 0
set Time = 0
set Map = 1
set the castNum of sprite pSprite = pRow1
updatestage
end
on NoStatus me
set How = 0
set Basic = 0
set Time = 0
set Map = 0
set the castNum of sprite pSprite = pAnimate4
updatestage
end
on SetVisiblesTrue me
set the visible of sprite 40 to true
set the visible of sprite 41 to true
set the visible of sprite 42 to true
set the visible of sprite 43 to true
end
on BYLVisiblesFalse
set the visible of sprite 40 to false
set the visible of sprite 41 to false
set the visible of sprite 42 to false
set the visible of sprite 43 to false
end
on TimeVisiblesFalse
set the visible of sprite 40 to false
set the visible of sprite 41 to false
set the visible of sprite 42 to false
set the visible of sprite 43 to false
end
on hideControl me
puppetSprite pSprite, FALSE
end
on showControl me
puppetSprite pSprite, true
end
on setDemoHilight me
set the castNum of sprite pSprite = pHilighted
updatestage
end
on SurvivalRollover me
if (the MouseV > 433) then
if (the MouseH < 230) then
nostatus
reset me
return FALSE
else
if (the MouseH > 257 and the MouseH < 312) then
HowStatus
else
if (the MouseH > 330) then
nostatus
reset me
return FALSE
end if
end if
end if
else
if (the MouseV > 423) then
if (the MouseH < 220) then
nostatus
reset me
return FALSE
else
if (the MouseH > 235 and the MouseH < 275) then
BasicStatus
else
if (the MouseH > 296 and the MouseH < 327) then
HowStatus
else
nostatus
end if
end if
end if
else
if (the MouseV > 410) then
if (the MouseH < 220) then
nostatus
reset me
return FALSE
else
if (the MouseH > 245 and the MouseH < 296) then
BasicStatus
else
if (the MouseH > 312 and the MouseH < 352) then
HowStatus
else
if (the MouseH > 225 and the MouseH < 257) then
TimeStatus
else
nostatus
end if
end if
end if
end if
else
if (the MouseV > 398) then
if (the MouseH < 210) then
nostatus
reset me
return FALSE
else
if (the MouseH > 228 and the MouseH < 257) then
TimeStatus
else
if (the MouseH > 275 and the MouseH < 317) then
BasicStatus
else
if (the MouseH > 327 and the MouseH < 375) then
howStatus
else
nostatus
end if
end if
end if
end if
else
if (the MouseV > 386) then
if (the MouseH < 210) then
nostatus
reset me
return FALSE
else
if (the MouseH > 296 and the MouseH < 327) then
BasicStatus
else
if (the MouseH > 351 and the MouseH < 381) then
HowStatus
else
if (the MouseH > 242 and the MouseH < 280) then
TimeStatus
else
if (the MouseH > 209 and the MouseH < 241) then
MapStatus
else
nostatus
end if
end if
end if
end if
end if
else
if (the MouseV > 373) then
if (the MouseH < 200) then
nostatus
reset me
return FALSE
else
if (the MouseH > 205 and the MouseH < 242) then
MapStatus
else
if (the MouseH > 257 and the MouseH < 296) then
TimeStatus
else
nostatus
end if
end if
end if
else
if (the MouseV > 359) then
if (the MouseH < 210) then
nostatus
reset me
return FALSE
else
if (the MouseH > 234 and the MouseH < 242) then
MapStatus
else
nostatus
end if
end if
else
nostatus
end if
end if
end if
end if
end if
end if
end if
end
on TurnOnHelpSound me
set phelpStatus = 1
end
on TurnOffHelpSound me
set phelpStatus = 0
end
on setNewSound me, aSound
set pMySound = aSound
end